<?php

declare(strict_types=1);

/**
 * @Author:     Frank
 * @contact     frank_hhm@163.com
 * @Date:       2022-11-18 21:44:52
 * @Last Modified time: 2022-12-02 18:00:19
 */
namespace app\common\services\mate;

use frank\base\BaseService;
use frank\services\JwtAuthService;
use frank\exception\CommonException;
use app\common\dao\mate\FilesDao;
use app\common\model\mate\FilesModel;

/**
 * 文件
 * Class FilesService
 */
class FilesService extends BaseService
{

    /**
     * FilesService constructor.
     * @param FilesDao $dao
     */
    public function __construct(FilesDao $dao)
    {
        $this->dao = $dao;
    }

    /**
     * 获取列表
     */
    public function getPageList(array $where = [])
    {
        [$page, $limit] = $this->getPageValue();
        $list = $this->dao->getPageList($where,$page, $limit);
        return $list;
    }

    public function updateGroup($ids,$groupId){
        $res = FDb::name('mate_files')->whereIn('id',$ids)->update($groupId);
        return $res;
    }
}